<?php if((isset($_SESSION['sys_admin']))) {?>
<div class="manage-product">
<div class="manage-product-atas">List  Product</div>
<div class="manage-produk-tengah">
<a href="<?php echo site_url('master/product');?>"><img src="<?php echo base_url();?>images/product.png" border="none" width="100" /></a>
<div class="manage-produx-tengah-box">
<?php
if(isset($_SESSION['sys_admin']) and isset($_SESSION['name'])) {

	echo ! empty($message) ? '<p class="message">' . $message . '</p>': '';
	echo ! empty($success) ? '<p class="message">' . $success . '</p>': '';
	
	$flashmessage = $this->session->flashdata('message');
	echo ! empty($flashmessage) ? '<p class="message">' . $flashmessage . '</p>': '';
	
	


/*echo ! empty($table) ? $table : '';*/
?>



<table cellpadding="0" cellspacing="0" border="0" id="table" class="sortable" width="600">
<thead>
	<tr>
		<th>NO</th><th><h3>PRODUCT</h3></th><th><h3>NAME</h3></th><th><h3>DESC</h3></th><th><h3>ACTIONS</h3></th>
		
	</tr>
</thead>
<tbody>
	<?php
		$w1 ="#bee1ff";
		$w2 ="#90ccff";
		$warna = $w1;
		$no =0;
		foreach($cek->result() as $cek) {
			if($warna == $w1) {
		$warna = $w2;
		} else {
			$warna = $w1;
			}
		$no ++;
	?>
	<tr bgcolor="<?php echo $warna;?>">
		<td><?php echo $no;?></td><td><?php echo strip_tags($cek->product);?></td><td><?php echo strip_tags($cek->name);?></td><td><?php echo strip_tags($cek->descr);?></td><td><a href="<?php echo site_url('master/product/update_products')."/".$cek->prod_id;?>"><img src="<?php echo base_url();?>images/update.png" border="none"></a> &nbsp; <?php echo anchor('master/product/delete_product/'.$cek->prod_id,'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ',array('class'=>'delete','onclick'=>"return confirm('Anda yakin akan menghapus data ini?')"));?></td>
	</tr>
	<?php } ?>
	<?php } ?>
</tbody>
</table>
</div>
<script type="text/javascript" src="<?php echo base_url();?>js/sorter.js"></script>
<script type="text/javascript">
	var sorter = new TINY.table.sorter("sorter");
		sorter.head="heads";
		sorter.asc = "asc";
		sorter.desc = "desc";
		sorter.even = "evenrow";
		sorter.odd = "oddrow";
		sorter.evensel ="evenselected";
		sorter.oddsel ="oddselected";
		sorter.paginate= true;
		sorter.currentid ="currentpage";
		sorter.limited ="pagelimit";
		sorter.init("table",1);
</script>
</div>
<div class="manage-product-bawah"></div>
</div>
<?php } ?>